<?php

/**
 * @Author: zhibinm (113664000@qq.com)
 * @Date:   2018-04-14 08:08:38 
 * @Copyright:   xuebingsi
 * @Last Modified by:   Zhibinm
 * @Last Modified time: 2018-04-14 09:12:33
 */

$mail = "34534@sdfd.com";
$mail = "sdf3sd453f4@sdfd.com.cn.net";
$mail = "sd_f3s_d453f4_@sdfd.com.cn";
$mail = "b@xuebings.com";
$mail = "95@qq.com";

$mail = "9_f@qq.cn.com.net";

$preg = "/^([a-z0-9]{1,2}|[a-z0-9]\w*[a-z0-9])@([a-z0-9]{1,2}|[a-z0-9][a-z0-9-]*[a-z0-9])(\.[a-z]{2,})+$/i";

$c = preg_match($preg,$mail);

// var_dump($c);

$id = "445281 1986 11 24 1877";

$id = "44528120170623258b";

$preg = "/^[1-8]\d{5}(19\d{2}|20(0[0-9]|1[0-8]))(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]|)\d{3}[0-9x]$/i";

$c = preg_match($preg,$id);

// var_dump($c);


$img = "df.jpg.jpg";

$preg = "/^.+\.(png|gif|jpg|bmp|jpeg)$/";

$c = preg_match($preg,$img);

// var_dump($c);


// www.baike.baidu.com

// www.test.xbs.xuebingsi.com

$data = file_get_contents("https://www.lagou.com/jobs/4421108.html?source=home_hot&i=home_hot-1");
echo $data;exit;

// $preg = "/data-lg-tj-cid=\"\d+?\">(.+?)<\/a>.+?<\/h2>{1}?.+?<!-- 此处需要和后台确认 -->/s";

$preg = "/class=\"position_link fl wordCut\".+?data-index=\".+?\".+?title=\"(.+?)\"/s";

// $preg = "/<!-- 此处需要和后台确认 -->/";

$c = preg_match_all($preg,$data,$out);


var_dump($c);

var_dump($out);

$preg = "/<span class=\"salary fr\">(.+?)<\/span>/";

$c = preg_match_all($preg,$data,$out);

var_dump($c);

var_dump($out[1]);










